"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const base_1 = require("./base");
class DatePartDescriber extends base_1.Describer {
    // *
    starSegment(exp) {
        return '每天';
    }
    // */3
    starSlashNumberSegment(exp) {
        const interval = exp.replace(`*/`, '');
        return `每${interval}天`;
    }
    // 1-9/3
    spanSlashNumberSegment(exp) {
        const [_, start, end, interval] = exp.match(/^(\d+)-(\d+)\/(\d+)$/);
        return `${base_1.NUMBER_MAP_CHINESE[start]}到${base_1.NUMBER_MAP_CHINESE[end]}号中的每${interval}天`;
    }
    //1-9
    spanSegment(exp) {
        const [_, start, end] = exp.match(/^(\d+)-(\d+)$/);
        return `${base_1.NUMBER_MAP_CHINESE[start]}到${base_1.NUMBER_MAP_CHINESE[end]}号`;
    }
    // 3
    singleNumberSegment(exp) {
        return `${base_1.NUMBER_MAP_CHINESE[exp]}号`;
    }
}
exports.DatePartDescriber = DatePartDescriber;
